<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Url</title>
    <script type="text/javascript" language="javascript" src="../sfdcj/sfdcj.nocache.js"></script>
	<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

	<!------------------------------------ Tool tip Plugin --------------------------------------------->
	<script src="jquery.hoverIntent.js" type="text/javascript"></script>
	<script src="jquery.bgiframe.min.js" type="text/javascript"></script>
	<script src="jquery.cluetip.js" type="text/javascript"></script>
	<script src="demo.js" type="text/javascript"></script>
	<link rel="stylesheet" href="jquery.cluetip.css" type="text/css" />
	<link rel="stylesheet" href="demo.css" type="text/css" />

	<!------------------------------------ Validation Plugin --------------------------------------------->
    <script language="javascript" type="text/javascript" src="jquery.validate.min.js"></script>
    <script language="javascript" type="text/javascript" src="messages_ja.js"></script>
    
	<script type="text/javascript"> 
	    $.validator.setDefaults({
            submitHandler: function() { closeChild(); }
         });
	
  		$(document).ready(function(){
    		$("#form-host").validate();
  		});
  			
		function closeChild() {
			var parameters = constrcutParameters();
			window.opener.document.getElementById("temp").value = parameters; 
			opener.window.callByChild();
			window.close();
		}

		function constrcutParameters() {
			var attrs = document.getElementById("fullName").value.split("\n");
			var result ="";
			var max = attrs.length;
			for(i = 0; i < max; i++) {
				if(i != 0) {
					result = result + ";;";
				}
					
				result = result.concat("fullName" + i + ":" + attrs[i]);

			}
			return result;
		}
	
		
	</script>    
  </head>

  <body>
	<form method="POST" action="#"  id="form-host">

	<!------------------------------------ Modify here --------------------------------------------->
		<table cellspacing="5" cellpadding="5">
			<caption>選択リスト</caption>
			<tr>
				<td>
					<a class="title" href="#" title="選択リストの値|選択リストを入力してください。|各行に入力できる値は 1 つです。|例　|りんご|みかん|なし">選択リストの値</a> 
				</td>
				<td>	
					<textarea name="fullName" id="fullName" rows="4" cols="20" class="required"></textarea>
				</td>
			</tr>
			<tr>

				<td colspan="2" align="right">
					<input type="submit" value="submit" />
				</td>
			</tr>
		</table>
	<!------------------------------------ Modify here --------------------------------------------->	
	
	</form>

  </body>
</html>